﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ApplLogic.ApplClasses;
using ApplLogic.ApplDbMediators;

namespace ApplLogic.LogicalServices
{
    public class ApplWorkerRequestHandler : ApplRequestHandlerAbstract
    {


        public void UpdateWorker(ApplWorker updatedWorker)
        {
            ApplDbWorkerMediator.Instance.UpdateWorker(updatedWorker);
        }

        //public void AddSingleShiftRequestToWorker(ApplSingleRequest singleRequestToAdd)
        //{
        //    ApplDbRequestMediator.Instance.AddShiftToWorkerWithType(singleRequestToAdd, true);
        //}

        public void UpdateSingleShiftRequest(ApplSingleRequest singleRequestToUpdate)
        {
            ApplDbRequestMediator.Instance.UpdateRequestType(singleRequestToUpdate, true);
        }

        public void DeleteRequest(ApplSingleRequest requestToDelete)
        {
            ApplDbRequestMediator.Instance.DeleteRequest(requestToDelete, true);
        }

        public void CopyRequestFrom(string workerId, DateTime startTime, DateTime endTime)
        {
            ApplDbRequestMediator.Instance.CopyRequestFrom(workerId, startTime, endTime);
        }



        //public void DeleteAllRequestsOfWorkerInDateRange(string workerId, DateTime startTime, DateTime endTime)
        //{
        //    ApplDbWorkerMediator.Instance.DeleteAllRequestsOfWorkerInDateRange(workerId, startTime, endTime, true);
        //}


    }
}
